<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看图片</title>
<%@ include file="/view/common/tags.jsp"%>
<link rel="stylesheet" href="${sysManagerV1}/js/kindeditor/themes/default/default.css" type="text/css"/>
</head>
<body>
	<div style="padding: 10px">
		<span style="color: red; float: none">点击查看大图</span>
	</div>
	<div class="well well_p" >
		<sk:form method="post" cssClass="form-horizontal" action="" id="saveAndUpdateFrom" target="_parent"  enctype="multipart/form-data">
			<div style="padding: 10px">
				<c:forEach begin="1" end="5" varStatus="varStatus">
						<a href="" target="_blank" style="margin: 5px;display: inline-block;width:30%; height: 100%; float: left">
							<img id="imgPath${varStatus.index}" src="" width="160px;" height="118px;" onerror="javascript:this.src='${sysManagerV1}/images/uploadImage/noimage.gif;'">
						</a>
				</c:forEach>
			</div>
 			<input type="hidden" id="rowId" name="rowId" value="<%=request.getParameter("rowId")%>">
           	<input type="hidden" id="token" name="token" value="">
		</sk:form>
	</div>
</body>
<%@ include file="/view/common/footer.jsp"%>
<script type="text/javascript" charset="UTF-8" src="${sysManagerV1}/js/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" charset="gbk" src="${sysManagerV1}/js/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">

$(function(){
	$("#token").val(sessionStorage.getItem("token"));
    $.ajax({
        url: "${tradeV1}/tradeGoodsAudit/viewImg",
        type: "post",
        cache: false,
        data: new FormData($("#saveAndUpdateFrom")[0]),
        dataType:"json",
        processData: false,
        contentType: false,
        async:false,
        success: function(data) {
            console.log(data.imgList);
            var imgList = data.imgList;
            if(data.code == 1){
                $("#imgPath1").attr('src',imgList[0].IMAGE_PATH_1);
                $("#imgPath1").parent().attr('href',imgList[0].IMAGE_PATH_1);
                $("#imgPath2").attr('src',imgList[0].IMAGE_PATH_2);
                $("#imgPath2").parent().attr('href',imgList[0].IMAGE_PATH_2);
                $("#imgPath3").attr('src',imgList[0].IMAGE_PATH_3);
                $("#imgPath3").parent().attr('href',imgList[0].IMAGE_PATH_3);
                $("#imgPath4").attr('src',imgList[0].IMAGE_PATH_4);
                $("#imgPath4").parent().attr('href',imgList[0].IMAGE_PATH_4);
                $("#imgPath5").attr('src',imgList[0].IMAGE_PATH_5);
                $("#imgPath5").parent().attr('href',imgList[0].IMAGE_PATH_5);
            } else {
                parent.layer.msg("图片加载失败！");
            }
        }
    });
})

</script>
</html>